<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <h2>成功的javascript开发者的7个习惯</h2>
    <dl>
        <dd>更多面型对象的javascript</dd>

    </dl>
  <script>
  /*对象
      function newClass() {
        alert("constructor");
        this.firstName = "frank";
        this.sayName = function () {
            alert(this.firstName);
        }
      }
      var nc = new newClass();
      nc.sayName();
      */
     /*原型 */
     function newClass() {
      this.firstName = "frank";
     }
     newClass.prototype.sayName = function () {
      alert(this.firstName);
     }
  </script>

</body>
</html>
